package meconsea.life.buddy.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import meconsea.life.sys.entity.AbsEntity;

import org.hibernate.annotations.Type;

@Entity
@Table(name="BUDDY_LIST")
@NamedQueries({
	@NamedQuery(name=BuddyList.BUDDY_LIST_FIND_BYUSER,query="SELECT O FROM BuddyList O where O.userName=:userName"),
	@NamedQuery(name=BuddyList.BUDDY_LIST_FIND_ORDERFRIEND,query="SELECT O FROM BuddyList O order by O.friendBuddySum ")
})
public class BuddyList extends AbsEntity {
	
	public final static String BUDDY_LIST_FIND_BYUSER="buddy_list_find_byuser";
	public final static String BUDDY_LIST_FIND_ORDERFRIEND="buddy_list_find_orderfriend";
	
	@Column(name="username",length=64)
	private String userName;
	
	@Column(name="friendBuddy")
	@Type(type="text")
	private String friendBuddy;
	
	@Column(name="blackBuddy",length=2048)
	private String blackBuddy;
	
	@Column(name="friendBuddySum")
	@Type(type="integer")
	private Integer friendBuddySum;

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getFriendBuddy() {
		return friendBuddy;
	}

	public void setFriendBuddy(String friendBuddy) {
		this.friendBuddy = friendBuddy;
	}

	public String getBlackBuddy() {
		return blackBuddy;
	}

	public void setBlackBuddy(String blackBuddy) {
		this.blackBuddy = blackBuddy;
	}

	public Integer getFriendBuddySum() {
		return friendBuddySum;
	}

	public void setFriendBuddySum(Integer friendBuddySum) {
		this.friendBuddySum = friendBuddySum;
	}
	
	
	
}
